package com.gis3c.sys.dao;

import com.gis3c.sys.entry.po.App;
import com.gis3c.sys.entry.po.Menu;

import java.util.List;
import java.util.Set;

/**
 * Created by hukekuan on 2017/12/22.
 */
public interface MenuDao {
    /**
     * 根据应用编号获取所有菜单，菜单按父子菜单排序
     * @param appId
     * @return
     */
    public List<Menu> findMenuList(String appId);
    public List<Menu> findMenuListForRole(Set<String> roleIds, String appId);
    public Menu findMenuById(String menuId);
    public List<Menu> findMenuList(String appId,String parentMenuId);
    public List<Menu> findMenusByPage(String appId,String parentMenuId,int pageSize,int currentPage);
    public Integer findMenuCount(String appId,String parentMenuId);
    public Integer findMenuCount(String parentMenuId);
    public String findParentIdByMenuId(String menuId);
    public List<String> findChildMenusByParentId(String parentId);
    public Menu createMenu(Menu menu);
    public Integer deleteMenByIds(List<String> menuIds);
    public Integer deleteMensByAppId(String appId);
    public Integer setMenuLeaf(String menuId, Boolean isLeaf);

    public Integer correlationApp(String appId,String menuId);
    public Integer uncorrelationAppByMenuIds(List<String> menuIds);

    public List<String> findMenuIdsByRole(String roleId,String appId);
}
